package com.ricky.action;

import java.util.ArrayList;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.ricky.bean.User;
import com.ricky.service.IUserService;

@Controller
@RequestMapping("/user")
public class UserAction {
	@Resource(name="userServiceImpl")
	private IUserService userService;
	@RequestMapping("/getUser")
	public String getUser(ModelMap map){
		ArrayList<User> arrayList=userService.getAllUser();
		map.put("user", arrayList);
		return "success";
	}
}
